export const getRowBtnList = (type: string, chileType: string) => {
  const allBtn = {
    rollback: {
      name: '详情',
      type: '3',
      typeChange: 'godetial',
      func: details,
    },
    Generateaprice: {
      name: '生成比价单',
      type: '3',
      typeChange: 'Generateapricecomparisonsheet',
      func: Generateapricecomparisonsheet,
    },
    send: {
      name: '退回',
      type: '4',
      typeChange: 'rollback',
      func: sendback,
    },
    Uploadfile: {
      name: '上传供应商选择文件',
      type: '4',
      typeChange: 'upfile',
      func: () => {
        return Promise.resolve();
      },
      // func: Uploadvendorselectionfile,
    },
    Withdraw: {
      name: '撤销询比价',
      type: '4',
      typeChange: 'Withdrawtheinquiry',
      func: Withdrawtheinquiry,
    },
    submit: {
      name: '提交审批',
      type: '4',
      typeChange: 'submitforapproval',
      func: submitforapproval,
    },
  };

  const btnlist = <any>{
    '11': [
      allBtn.rollback,
      allBtn.Generateaprice,
      allBtn.send,
      allBtn.Uploadfile,
      allBtn.Withdraw,
      allBtn.submit,
    ],
  };
  return btnlist[`${type}${chileType}`];
};

// 详情
const details = (param: any) => {
  console.log('详情', param.record);
  return Promise.resolve();
};

// 生成比价单
const Generateapricecomparisonsheet = (param: any) => {
  console.log('生成比价单', param.record);
  return Promise.resolve();
};

// 退回
const sendback = (param: any) => {
  console.log('退回', param.record);
  return Promise.resolve();
};

// 上传供应商选择文件
// const Uploadvendorselectionfile = (param: any) => {
//   console.log('上传供应商选择文件', param.record);
//   return Promise.resolve();
// };

// 撤销询比价
const Withdrawtheinquiry = (param: any) => {
  console.log('撤销询比价', param.record);
  return Promise.resolve();
};

// 提交审批
const submitforapproval = (param: any) => {
  console.log('提交审批', param.record);
  return Promise.resolve();
};

export default null;
